﻿using System;
using System.Collections.Generic;
using SharpSqlAnalyzer.nodes;

namespace SharpSqlAnalyzer.stmt
{
	// Token: 0x02000098 RID: 152
	public class TCreateSequenceStmt : TCustomSqlStatement
	{
		// Token: 0x0600045D RID: 1117 RVA: 0x002FB38F File Offset: 0x002F958F
		public TCreateSequenceStmt(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.sstcreatesequence;
		}

		// Token: 0x17000092 RID: 146
		// (get) Token: 0x0600045E RID: 1118 RVA: 0x002FB3A0 File Offset: 0x002F95A0
		// (set) Token: 0x0600045F RID: 1119 RVA: 0x002FB3A8 File Offset: 0x002F95A8
		public virtual List<TSequenceOption> Options
		{
			get
			{
				return this.options;
			}
			set
			{
				this.options = value;
			}
		}

		// Token: 0x17000093 RID: 147
		// (get) Token: 0x06000460 RID: 1120 RVA: 0x002FB3B1 File Offset: 0x002F95B1
		// (set) Token: 0x06000461 RID: 1121 RVA: 0x002FB3B9 File Offset: 0x002F95B9
		public virtual TObjectName SequenceName
		{
			get
			{
				return this.sequenceName;
			}
			set
			{
				this.sequenceName = value;
			}
		}

		// Token: 0x06000462 RID: 1122 RVA: 0x002FB3C4 File Offset: 0x002F95C4
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			base.doParseStatement(psql);
			TCreateSequenceSqlNode tcreateSequenceSqlNode = (TCreateSequenceSqlNode)this.rootNode;
			this.sequenceName = tcreateSequenceSqlNode.SequenceName;
			base.DatabaseObjects.Add(this.sequenceName);
			this.options = tcreateSequenceSqlNode.Options;
			return 0;
		}

		// Token: 0x06000463 RID: 1123 RVA: 0x002FB419 File Offset: 0x002F9619
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06000464 RID: 1124 RVA: 0x002FB429 File Offset: 0x002F9629
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x040010F1 RID: 4337
		private TObjectName sequenceName;

		// Token: 0x040010F2 RID: 4338
		private List<TSequenceOption> options;
	}
}
